/*
 *  $Id: Devour.cs 1221 2010-11-30 16:54:52Z thenn.erannor $
 *  This file is a part of Ragima CCG.
 *  (C) 2008 Ragima development group.
 *
 *  Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Water.Abilities {
    public class Devour: AbilityCard<int> {
        public Devour(): base("001_w_a_devour") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Water;
            Target = new JogTarget(GetTargetPhrase(), GetJogValue);
            TapCreatureAfterUse = false;
        }

        private static IJogValueProvider GetJogValue(Player player) {
            return new ManaJogValueProvider(player, ElementType.Water);
        }

        protected override void DoAction(TargetArgs<int> args) {
            args.Player.DecrementMana(ElementType.Water, args.Target);
            args.Caster.AddAffect(new TimeAffect(1, TimePhase.OwnOffence, new Affects.ModMaxHealth(args.Target)));
        }
    }
}
